package com.demo.gulimall.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.demo.gulimall.product.entity.SkuImages;
import com.demo.gulimall.product.mapper.SkuImagesMapper;
import com.demo.gulimall.product.service.SkuImagesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * sku图片
 *
 * @author Chen Yuan
 */

@Service
public class SkuImagesServiceImpl extends ServiceImpl<SkuImagesMapper, SkuImages> implements SkuImagesService {

    @Autowired
    private SkuImagesMapper skuImagesMapper;

    @Override
    public List<SkuImages> getImagesBySkuId(Long skuId) {
        return baseMapper.selectList(new QueryWrapper<SkuImages>().eq("sku_id", skuId));
    }
}
